const express = require("express")

const router = express.Router()

const shopFc = require("../router_handler/shopFc")

// 上传商品的数据
router.post("/pushShop",shopFc.pushShop)

//获取商品的数据
router.get("/getShop",shopFc.getShop)

// 修改商品的数据
router.post("/changeShop",shopFc.changeShop)

// 上传购物车的数据
router.post("/pushShoppingCart",shopFc.pushShoppingCart)

// 获取购物车的数据
router.get("/getShoppingCartData",shopFc.getShoppingCartData)

//获取商品标题

router.get("/getShopTitle",shopFc.getShopTitle)

// 上传商品标题
router.post("/pushShopTitle",shopFc.pushShopTitle)

// 修改商品标题
router.post("/setShopTitle",shopFc.setShopTitle)

// 删除商品标题
router.post("/deleteShopTitle",shopFc.deleteShopTitle)

// 获取商品纯数据
router.get("/getShopInfo",shopFc.getShopInfo)

// 删除商品
router.get("/deleteShop",shopFc.deleteShop)

//获取地址
router.get("/getShopAddress",shopFc.getShopAddress)

router.post("/pushShopAddress",shopFc.pushShopAddress)

//把商品放入购物车
router.get("/pushCartList",shopFc.pushCartList)

//获取购物车的数据
router.get("/getCartList",shopFc.getCartList)

//更改购物车的数量
router.get("/setShopNum",shopFc.setShopNum)

// 从购物车中删除
router.get("/deleteCartShop",shopFc.deleteCartShop)

// 清除购物车
router.get("/clearCart",shopFc.clearCart)

// 提交订单
router.get("/pushOrder",shopFc.pushOrder)

// 获取订单的数据
router.get("/getOrderList",shopFc.getOrderList)

// 获取商家已接收订单的数据
router.get("/receivedOrderList",shopFc.receivedOrderList)

// 获取用户提交订单的数据
router.get("/cmsGetOrderList",shopFc.cmsGetOrderList)

// 获取单条数据

router.get("/getOneOrder",shopFc.getOneOrder)

router.get("/changeOrderActive",shopFc.changeOrderActive)

// 添加新的优惠券

router.post("/addDiscount",shopFc.addDiscount)

// 获取优惠券
router.get("/getDiscount",shopFc.getDiscount)

//用户新增的优惠券
router.get("/userAddDiscount",shopFc.userAddDiscount)

// 获取用户新增的优惠券
router.get("/getUserAddDiscount",shopFc.getUserAddDiscount)
//删除用户的优惠券
router.get("/deleteUserDiscount",shopFc.deleteUserDiscount)


router.get("/changedisIstrue",shopFc.changedisIstrue)

// 获取用户的密码
router.get("/getUerPayPassword",shopFc.getUerPayPassword)

// 插入用户的密码
router.get("/insertPaypassword",shopFc.insertPaypassword)

// 获取用户的金额
router.get("/getUserMoney",shopFc.getUserMoney)

// 匹配支付密码
router.get("/matchPayPassword",shopFc.matchPayPassword)

//不匹配密码插入金额
router.get("/noMatchPassword",shopFc.noMatchPassword)

// 获取用户的交易信息
router.get("/getTransactionInfo",shopFc.getTransactionInfo)

// 匹配支付密码
router.get("/matchPassword",shopFc.matchPassword)

// 更改交易密码
router.get("/changePayPassword",shopFc.changePayPassword)


// 编辑店铺
router.post("/editStoreAddress",shopFc.editStoreAddress)
// 删除店铺
router.post("/deleteStoreAddress",shopFc.deleteStoreAddress)

// 添加奖池数据
router.post("/insertLuckDraw",shopFc.insertLuckDraw)

// 获取奖池数据
router.get("/getLuckDraw",shopFc.getLuckDraw)

// 添加用户抽的奖
router.get("/addUserAward",shopFc.addUserAward)

// 获取用户的奖品
router.get("/getUserAward",shopFc.getUserAward)

//删除用户的奖品
router.get("/deleteUserAward",shopFc.deleteUserAward)

// 商品积分
router.post("/integralShop",shopFc.integralShop)

// 设置路由
router.post("/setRouter",shopFc.setRouter)

// 获取商品积分
router.get("/getIntegralShop",shopFc.getIntegralShop)
module.exports = router